package com.api.rc.lobby.domain;

import com.api.user.vo.UserInfoVo;
import lombok.Getter;
import org.springframework.web.socket.WebSocketSession;

import java.io.Serializable;

/**
 * @author RenQiang
 * @date 2021/7/13
 */
@Getter
public class LobbyPlayer implements Serializable {
    private static final long serialVersionUID = 7002659310975459247L;

    private final UserInfoVo userInfo;
    private volatile boolean ready;
    private final WebSocketSession session;

    public LobbyPlayer(UserInfoVo userInfo, WebSocketSession session) {
        this.userInfo = userInfo;
        this.ready = false;
        this.session = session;
    }

    public void updateReadyStatus(boolean ready) {
        this.ready = ready;
    }
}
